package com.zz.config;

import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.type.AnnotatedTypeMetadata;

public class UserCondition implements Condition {

    @Override
    public boolean matches(ConditionContext conditionContext, AnnotatedTypeMetadata annotatedTypeMetadata) {
        boolean flag=true;
        try {
            Class<?> aClass = Class.forName("com.zz.pojo.Users");
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
            flag=false;
        }
        return flag;
    }
}
